<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>用户注册</title>

		<meta name="keywords" content="{$Think.CONFIG.keywords}" />
		<meta name="description" content="{$Think.CONFIG.description}" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<include file="Public/head" />

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<!--这里是验证字符-->
<script src="https://cdn.bootcss.com/jquery-validate/1.17.0/jquery.validate.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-validate/1.17.0/localization/messages_zh.js"></script>
<script>
$.validator.setDefaults({
    submitHandler: function() {
    
    }
});
$().ready(function() {
    $("#commentForm").validate();
});
</script>


   </head>

	<body class="no-skin">
		<div class="main-container" id="main-container">
		
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->


					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
<!--请最好全部填写，里面的QQ、邮箱在很多地方都会用到，尽量真实。<p>-->
<!--【注意】这是个人平台，没收人一分钱，因此也没有责任。所以想开我就开，想关我就关，大家高兴就好。---老黄牛-->


						<!-- /section:settings.box -->
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
									<form class="form-horizontal" action="{:U('Lilyreg/reg')}" method="post">

             <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6"></label>
              <div class="col-sm-9">
									        <p>
        <label style="font-size: 36px;" class="center"><strong>用户注册</strong></label>
    </p>
               <span class="help-inline col-xs-12 col-sm-7">
                <span class="middle"></span>
               </span>
              </div>
             </div>

  <!-- 第一个是传值用的 -->
                                         <input id="wx_openid"  name="wx_openid" type="hidden"   value="{$wx_openid}">

             <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">用户名</label>
              <div class="col-sm-9">
               <input type="text" name="user" id="user" minlength="4" required alnum  placeholder="4位及以上且请只使用英文或数字" class="col-xs-10 col-sm-5 " >
               <span class="help-inline col-xs-12 col-sm-7">
                <span class="middle">建议工号/学号(必填)</span>
               </span>
              </div>
             </div>
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 用户密码 </label>
										<div class="col-sm-9">
											<input type="password" name="password" id="password" placeholder="用户密码" class="col-xs-10 col-sm-5" value="" required>

										</div>
									</div>
									
									
             <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">姓名</label>
              <div class="col-sm-9">
               <input type="text" name="nickname" id="nickname"  required  placeholder="姓名" class="col-xs-10 col-sm-5"   >
               <span class="help-inline col-xs-12 col-sm-7">
                <span class="middle">请实名，很多地方要用到</span>
               </span>
              </div>
             </div>


             <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">手机号</label>
              <div class="col-sm-9">
               <input type="text" name="phone" id="phone"  required  placeholder="手机号" class="col-xs-10 col-sm-5"   >
                
               <span class="help-inline col-xs-12 col-sm-7">
                <span class="middle">验证码将发送至手机。</span>
               </span>               
              </div>
             </div>
						
									<div class="space-4"></div>

             <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">短信验证码</label>
              <div class="col-sm-9">
               <input type="text" name="smscode" id="smscode"  required placeholder="短信验证码" class="col-xs-10 col-sm-5"  >
                <input  type="button" id="btn2" value="免费获取验证码" onclick="submitform(this)" />                
              </div>
             </div>							

 <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">学校</label>
              <div class="col-sm-9">

          <div class="controls">
            <select  name="classa" id="classa" class="input-xlarge form-control">
                <volist name='data' id='val'>
                    <option value="{$val['school']}">{$val['school']}</option>
                </volist>
              </select>
          </div>
           </div>
    </div>

 <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">部门</label>
              <div class="col-sm-9">

          <div class="controls">
            <select  name="classb" id="classb" class="input-xlarge form-control">
                <volist name='data' id='val'>
                    <option value="{$val['department']}">{$val['department']}</option>
                </volist>
              </select>
          </div>
           </div>
    </div>

 <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="form-field-6">班级</label>
              <div class="col-sm-9">

          <div class="controls">
            <select  name="classc" id="classc" class="input-xlarge form-control">
                <volist name='data' id='val'>
                    <option value="{$val['stuclass']}">{$val['stuclass']}</option>
                </volist>
              </select>
          </div>
           </div>
    </div>

 
 
    <!-- <div class="control-group">-->
    <!--      <label class="control-label">学院</label>-->
    <!--      <div class="controls">-->
    <!--        <select  name="classa" id="classa" class="input-xlarge form-control">-->
    <!--            <volist name='data' id='val'>-->
    <!--                <option value="{$val['school']}">{$val['school']}</option>-->
    <!--            </volist>-->
    <!--          </select>-->
    <!--      </div>-->
    <!--</div>-->

    <!--<div class="control-group">-->
    <!--      <label class="control-label">教师</label>-->
    <!--      <div class="controls">-->
    <!--        <select  name="classb" id="classb" class="input-xlarge form-control">-->
               
    <!--          </select>-->
    <!--      </div>-->
    <!--</div>-->

									<div class="space-4"></div>
									
									<div class="col-md-offset-2 col-md-9">
										<button class="btn btn-info" type="submit">
											<i class="icon-ok bigger-110"></i>
											提交
										</button>

										&nbsp; &nbsp; &nbsp;
										<button class="btn" type="reset">
											<i class="icon-undo bigger-110"></i>
											重置
										</button>
									</div>
								</form>
								
			
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->

					
					
					
						</div><!-- /.row -->

					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->
			<include file="Public/footer" />
			
		</div><!-- /.main-container -->

		<include file="Public/footerjs" />
		<!-- inline scripts related to this page -->


<script type="text/javascript"> 

function submitform(obj){
    $.post("{:U('Lilyreg/sms139send')}",
    {
        phone:$("#phone").val(),
    });
    
    settime(obj);

};

var countdown=60; 
function settime(obj) { 
    if (countdown == 0) { 
        obj.removeAttribute("disabled");    
        obj.value="免费获取验证码"; 
        countdown = 60; 
        return;
    } else { 
        obj.setAttribute("disabled", true); 
        obj.value="重新发送(" + countdown + ")"; 
        countdown--; 
    } 
setTimeout(function() { 
    settime(obj) }
    ,1000) 
}
jQuery.validator.addMethod("alnum", function(value, element){
return this.optional(element) ||/^[a-zA-Z0-9]+$/.test(value);
}, "只能包括英文字母和数字"); 
</script>	
<script type="text/javascript">
    $(document).ready(function(){
        //一级分类联动二级分类
        var classaval=$('#classa').val();
        $("#classb").load("__URL__/classify",{data:classaval,fc:'school',sc:'department'});

        $("#classa").change(function(){
            var val=$(this).val();
            //alert(val);
            $("#classb").load("__URL__/classify",{data:val,fc:'school',sc:'department'});
        });
        
        
        //二级分类联动三级分类
        $("#classb").change(function(){
            var val=$(this).val();
            //alert(val);
            $("#classc").load("__URL__/classify",{data:val,fc:'department',sc:'stuclass'});
        });
        //     //三级分类联动四级分类
        // $("#classb").change(function(){
        //      var val=$(this).val();
        //     temp=$('#info').load("__URL__/getteacherinfo",{data:val,fc:'name'});
            
        //     $('#info').html(temp);
        // });
    });
</script>	
	</body>
</html>
